package com.honey.comment.grammer.colon;

import java.util.regex.Pattern;

/**
 * 使用正则表达式匹配comment中的内容
 * @author Administrator
 *
 */
interface MatchItem {
	
	/** 冒号正则表达式匹配 */
	final static String REGEX_COLON = ":";
	
	/** 冒号正则表达对象 */
	final static Pattern PATTERN_COLON = Pattern.compile(REGEX_COLON,Pattern.DOTALL | Pattern.CASE_INSENSITIVE);
	
	/** 实体名称正则表达式匹配 */
	final static String REGEX_ENTITY_NAME = "en:|entity:|entityName:|alias:|map:|实体:|实体名:|映射:|映射名:";
	
	/** 实体名称正则表达对象 */
	final static Pattern PATTERN_ENTITY_NAME = Pattern.compile(REGEX_ENTITY_NAME,Pattern.DOTALL | Pattern.CASE_INSENSITIVE);
	
	/** 验证规则正则表达式匹配 */
	final static String REGEX_VALIDATOR = "validator:|validate:|验证:";
	
	/** 验证规则正则表达对象 */
	final static Pattern PATTERN_VALIDATOR = Pattern.compile(REGEX_VALIDATOR,Pattern.DOTALL | Pattern.CASE_INSENSITIVE);
	
	/** 虚拟删除正则表达式匹配 */
	final static String REGEX_VIRTUAL_DELETE = "vd:|del:|delete:|virtualdelete:|删除:|虚拟删除:";
	
	/** 虚拟删除正则表达对象 */
	final static Pattern PATTERN_VIRTUAL_DELETE = Pattern.compile(REGEX_VIRTUAL_DELETE,Pattern.DOTALL | Pattern.CASE_INSENSITIVE);
	
	/**
	 * 匹配格式
	 * @param item
	 * @return
	 */
	boolean match(String item ) ;
	
	/**
	 * 获取值
	 * @return
	 */
	String getValue() ;
	
}
